package com.shunwang.proj.dao;

import java.util.List;

import javax.annotation.PostConstruct;
import javax.annotation.Resource;

import org.springframework.orm.ibatis.support.SqlMapClientDaoSupport;
import org.springframework.stereotype.Repository;

import com.ibatis.sqlmap.client.SqlMapClient;
import com.shunwang.proj.pojo.TGame;
@Repository(value="ibatisDao")
public class GameDao extends SqlMapClientDaoSupport {
	@Resource(name="sqlMapClient")
	private SqlMapClient sqlMapClient;
	
	public List getGameAll(){
		return this.getSqlMapClientTemplate().queryForList("all.getGameAll");
	}
	
	public TGame getTopOneGame(){
		return (TGame)this.getSqlMapClientTemplate().queryForObject("topone.getTopOneGame");
	}
	@PostConstruct
	public void initSuperSqlMapClient(){
		super.setSqlMapClient(sqlMapClient);
	}
	
	
}
